package com.limetalks.logic
{
	import com.limetalks.data.Stream;
	import com.limetalks.data.User;
	import com.limetalks.events.LimeEvent;
	
	import flash.events.EventDispatcher;
	import flash.events.NetStatusEvent;
	import flash.net.NetConnection;
	import flash.net.Responder;
	
	import mx.core.Application;
	
	public class LimeTalksSphere extends LimeTalks {
		
		private var sphereScope:String = "sphere";
		
		private var GET_STREAMS_METHOD:String = "getStreams_Server";
		
		public function LimeTalksSphere() {
			super();
			connectionUrl = "rtmp://" + ip + "/" + app + "/" + sphereScope;
		}
		
		public function getStreams():void {
			connection.call(GET_STREAMS_METHOD, new Responder(onStreamsResult));
		}
 		
		protected function onStreamsResult(streams:Array):void {
			var e:LimeEvent = new LimeEvent(LimeEvent.STREAM_LIST);
			e.params.streams = streams;
			dispatchEvent(e)
		}
		
		
	}
}
